public class Sort {

    public static void insertSort(int[] arr){

        for (int i = 1; i < arr.length; i++) {
            int tmp = arr[i];
            for (int j = i-1; j >= 0; j--){
                if(arr[j] > tmp){
                    arr[j+1] =arr[j];
                    arr[j] = tmp;
                }else
                    break;
            }
        }

    }
}
